/* Overlays */

:root {
  --overlay-wrapper-background: rgba(0, 0, 0, 0.5);
}

.overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: var(--z-index-overlay);
  display: none;
}

.overlay.shown {
  display: flex;
  align-items: center;
  justify-content: center;
}

.overlay-background {
  position: fixed;
  width: 100%;
  height: 100%;
  cursor: pointer;
  background: var(--overlay-wrapper-background);
}

.close-overlay {
  position: absolute;
  top: 1em;
  right: 1em;
  margin: 0;
  color: var(--color-text-lighter);
}

.overlay-content {
  position: relative;
  z-index: var(--z-index-overlay);
  display: flex;
  width: 100%;
  max-width: 767px;
  max-height: 100%;
  padding: 1em;
  margin: 0.5em;
  background: var(--color-background);
  box-shadow: 0 0 20px var(--overlay-wrapper-background);
}

.overlay-content form,
.overlay-content > div {
  width: 100%;
}

.overlay strong {
  display: inline-block;
  margin: 6px 0 5px;
}

.overlay dt {
  display: inline-block;
  float: left;
  width: auto;
  padding-right: 10px;
  font-weight: normal;
  line-height: 1.8em;
  text-align: right;
}

.overlay dd {
  line-height: 1.8em;
}

.notifications {
  position: fixed;
  top: calc(var(--header-height) + 10px);
  right: 10px;
  width: 400px;
}

.notifications li {
  display: block;
  width: 100%;
  padding: 5px 10px;
  margin-bottom: 0.5em;
  color: var(--color-notification);
  background-color: var(--color-notification-info);
}

.notifications .error {
  background-color: var(--color-notification-error);
}

.notifications .warning {
  color: var(--color-text);
  background-color: var(--color-notification-warning);
}
